package com.coolingme.properties;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

/**
 * 手机网站支付配置类
 * 
 * @author wangyue
 * @date 2019-06-22 20:36:31
 */
@Configuration
@PropertySource("classpath:properties/alipay.properties")
public class AliWapPayProperties {

	/**
	 * 手机网站页面跳转同步通知页面路径<br>
	 * 需http://或者https://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问<br>
	 * 商户可以自定义同步跳转地址
	 */
	public static String RETURN_URL_WAP;

	/**
	 * 手机网站服务器异步通知页面路径<br>
	 * 需http://或者https://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问<br>
	 */
	public static String NOTIFY_URL_WAP;

	/**
	 * 手机网站支付成功跳转页面
	 */
	public static String RESPONSE_UTL_WAP;

	/**
	 * 销售产品码，商家和支付宝签约的产品码
	 */
	public static String PRODUCT_CODE_WAP;

	/**
	 * demo请求标示，用于标记是demo发出
	 */
	public static String ALIPAY_DEMO;

	/**
	 * demo请求标示，用于标记是demo发出
	 */
	public static String ALIPAY_DEMO_VERSION;

	@Value("${NOTIFY_URL_WAP}")
	public void setRETURN_URL(String NOTIFY_URL_WAP) {
		AliWapPayProperties.NOTIFY_URL_WAP = NOTIFY_URL_WAP;
	}

	@Value("${RETURN_URL_WAP}")
	public void setNOTIFY_URL(String RETURN_URL_WAP) {
		AliWapPayProperties.RETURN_URL_WAP = RETURN_URL_WAP;
	}

	@Value("${PRODUCT_CODE_WAP}")
	public void setPRODUCT_CODE_WAP(String PRODUCT_CODE_WAP) {
		AliWapPayProperties.PRODUCT_CODE_WAP = PRODUCT_CODE_WAP;
	}

	@Value("${RESPONSE_UTL_WAP}")
	public void setRESPONSE_UTL_WAP(String RESPONSE_UTL_WAP) {
		AliWapPayProperties.RESPONSE_UTL_WAP = RESPONSE_UTL_WAP;
	}

	@Value("${ALIPAY_DEMO}")
	public void setALIPAY_DEMO(String ALIPAY_DEMO) {
		AliWapPayProperties.ALIPAY_DEMO = ALIPAY_DEMO;
	}

	@Value("${ALIPAY_DEMO_VERSION}")
	public void setALIPAY_DEMO_VERSION(String ALIPAY_DEMO_VERSION) {
		AliWapPayProperties.ALIPAY_DEMO_VERSION = ALIPAY_DEMO_VERSION;
	}

}
